do while PIL6<>1 .and. pil5<>2 .AND. LASTKEY()<>27
   SET COLOR TO BG+/B
   @ 15,1 CLEA TO 23,78
   do BOX2 WITH 15,3,"DO YOU WANT TO :",'PRINT','QUIT','GR+','RB','GR+','R',PIL5,.T.,.T.
   IF PIL5=1
      do BOX2 WITH 20,3,"IS THE PRINTER :",'READY','NOT YET READY','GR+','RB','GR+','R',PIL6,.T.,.T.
   ENDIF
ENDDO
IF LASTKEY()=27 .or. pil5=2
   RETURN
ENDIF
DO BOXT WITH 15,53,'Printing...','GR*+','R',.T.,.T.
do preprtfm
SELE 3
SET EXCLU OFF
USE &DR&F3
IF FIL_LOCK()
   APPEND BLANK
ENDIF
IF REC_LOCK()
   DO PATR20
ENDIF
UNLOCK
SET DEVI TO SCREEN
SET COLO TO BG+/B,W+/N
@ 7,1 CLEA TO 23,78
PRPAT=.T.
RETURN

Procedure Preprtfm
*-----------------
SET DEVICE TO PRINTER
@ 00, 00 SAY '_____________________________________________________________________________'
@ 01, 00 SAY '|  |                BEIJING AEA INTERNATIONAL CLINIC                    |   |'
@ 02, 00 SAY '|  | 14 LIANGMAHE SOUTH ROAD,1/F CHAOYANG DISTRICT,BEIJING 10060, CHINA |   |'
@ 03, 00 SAY '|  ----------------------------------------------------------------------   |'
@ 04, 00 SAY '|                     |   TREATMENT FORM   | | DATE: ' + dtoc(date()) + '  |            |'
@ 05, 00 SAY '|                     ---------------------- -------------------            |'
@ 06, 00 SAY '| SURNAME   : ' + pname + ' FIRST NAME : ' + pfname + ' MID.INITIAL: ' + minit + ' |'
@ 07, 00 SAY '| DATE BIRTH: ' + dtoc(patdob) + '         NATIONALITY: ' + patnat + ' SEX(M/F)   : ' + patsex + ' |'
@ 08, 00 SAY '| BLOOD GRP : ' + GRP + 'RHESUS: ' + RHE + '      PATIENT FILE NUMBER: ' + kodepat + '                  |'
@ 09, 00 SAY '|---------------------------------------------------------------------------|'
@ 10, 00 SAY '| MEDICAL TREATMENT BY: ____________________ (Name of Doctor)|  COMMENTS    |'
@ 11, 00 SAY '| G.P.      : Day _  Night _  Holiday _  Spe. Call _         |              |'
@ 12, 00 SAY '| Procedures: ______________________________________________ |              |'
@ 13, 00 SAY '|             ______________________________________________ |              |'
@ 14, 00 SAY '| Specialist: On duty _    Special call _                    |              |'
@ 15, 00 SAY '| Procedures: ______________________________________________ |              |'
@ 16, 00 SAY '|             ______________________________________________ |              |'
@ 17, 00 SAY '|---------------------------------------------------------------------------|'
@ 18, 00 SAY '| DENTAL TREATMENT by: __________________________ (See attached DENTAL FORM)|'
@ 19, 00 SAY '|---------------------------------------------------------------------------|'
@ 20, 00 SAY '| X-RAY & ULTRASONOGRAPHY: _  (See attached X-RAY & U.S.G. form)            |'
@ 21, 00 SAY '|---------------------------------------------------------------------------|'
@ 22, 00 SAY '| LABORATORY EXAMINATIONS: _  (See attached LABORATORY form)                |'
@ 23, 00 SAY '|---------------------------------------------------------------------------|'
@ 24, 00 SAY '| EMERGENCY ROOM         : Care _  Observation _   (See attached E.R.)      |'
@ 25, 00 SAY '|---------------------------------------------------------------------------|'
@ 26, 00 SAY '| SURGERY BY             : _______________________________ (Name of Doctor) |'
@ 27, 00 SAY '| Procedures             : ________________________________________________ |'
@ 28, 00 SAY '|                          ________________________________________________ |'
@ 29, 00 SAY '| ANAESTHESIA BY         : _______________________________ (Name of Doctor) |'
@ 30, 00 SAY '|---------------------------------------------------------------------------|'
@ 31, 00 SAY '| CLINIC & NURSING CHARGES                                                  |'
@ 32, 00 SAY '|          AMBULANCE     : BEIJING _   AIRPORT _   OUTSIDE BEIJING _        |'
@ 33, 00 SAY '| Other (specify)        : _________________________________________________|'
@ 34, 00 SAY '| Nursing procedures     : _________________________________________________|'
@ 35, 00 SAY '|---------------------------------------------------------------------------|'
@ 36, 00 SAY '| PHYSICAL EXAM.         : BASIC _ COMPREHENSIVE _                          |'
@ 37, 00 SAY '| Other (specify)        : _________________________________________________|'
@ 38, 00 SAY '| Check-up performed by  : ______________________________(Name of Doctor)   |'
@ 39, 00 SAY '|---------------------------------------------------------------------------|'
@ 40, 00 SAY '| Other: (please specify) __________________________________________________|'
@ 41, 00 SAY '|        ___________________________________________________________________|'
@ 42, 00 SAY '|        ___________________________________________________________________|'
@ 43, 00 SAY '|---------------------------------------------------------------------------|'
@ 44, 00 SAY '|        |    P H A R M A C Y  -  D I S P E N S I N G  U N I T   |          |'
@ 45, 00 SAY '|        |_______________________________________________________|          |'
@ 46, 00 SAY '| CODE   |               DRUGS & DISPOSABLE ITEMS                | QUANTITY |'
@ 47, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 48, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 49, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 50, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 51, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 52, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 53, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 54, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 55, 00 SAY '| ______ | _____________________________________________________ | ________ |'
@ 56, 00 SAY '|___________________________________________________________________________|'
EJECT
SET DEVICE TO SCREEN

